package fr.miage.mesure;


public class ConvertionMesure {

	private Unite uniteDepart;
	private Unite uniteArrive;
	private TauxDeConvertion tauxConvertion;
	
	public ConvertionMesure (Unite monUniteDepart, Unite monUniteArrive, TauxDeConvertion monTauxConvertion){
		this.uniteDepart=monUniteDepart;
		this.uniteArrive=monUniteArrive;
		this.tauxConvertion=monTauxConvertion;
	}
	

	public Integer convertir(Integer maQuantite){
		return maQuantite*tauxConvertion.getValeurTaux();
	}
	

	public void setUniteDepart(Unite uniteDepart) {
		this.uniteDepart = uniteDepart;
	}


	public Unite getUniteDepart() {
		return uniteDepart;
	}


	public void setUniteArrive(Unite uniteArrive) {
		this.uniteArrive = uniteArrive;
	}


	public Unite getUniteArrive() {
		return uniteArrive;
	}


	public void setTauxConvertion(TauxDeConvertion tauxConvertion) {
		this.tauxConvertion = tauxConvertion;
	}


	public TauxDeConvertion getTauxConvertion() {
		return tauxConvertion;
	}

}
